<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>二级菜单</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        .center{
            margin: auto;
            width: 800px;
        }
        ul{
            list-style-type: none;
        }
        li{
            cursor: pointer;
        }
        .video, .exam{
            float: left;
            padding: 10px;
            background: yellow;
            width: 300px;
        }
        .video-list,.exam ul{
            display: none;
        }
        .video-list li{
            padding: 10px 0px;
        }
        .video:hover{
            background: red;
            color: white;
        }
        .video:hover .video-list{
            display: block;
        }
        .exam:hover{
            background: red;
            color: white;
        }
        .exam:hover .exam-list{
            display: block;
        }
        .video-list li:hover {
            background: yellow;
            color: black;
        }
        .exam-list li:hover {
            background: yellow;
            color: black;
        }
    </style>
</head>
<body>
    <div class="center">
        <ul>
            <li class="video">
                视频教程
                <ul class="video-list">
                    <li>html5视频教程</li>
                    <li>java视频教程</li>
                    <li>python视频教程</li>
                    <li>ui视频教程</li>
                </ul>
            </li>
            <li class="exam">
                认证考试
                <ul class="exam-list">
                    <li>mba考试</li>
                    <li>中级程序员认证</li>
                </ul>
            </li>
        </ul>
    </div>
</body>
</html>